/* *
 * @program: LivePublisher
 *
 * @description: ${description}
 *
 * @author: 909845
 *
 * @create: 2019-03-28 15:02
***/

#ifndef LIVEPUBLISHER_LIVEPUBLISHERMANAGER_H
#define LIVEPUBLISHER_LIVEPUBLISHERMANAGER_H

#define OVIDEOCDNCLIENTAPI_EXPORT
#include <Common/Common.h>
#include <vector>
#include "../Public/MyTimer.h"
#include "../../Include/libLivePublisher.h"

using namespace std;

class CLivePublisherManager: public ILivePublisherManager, public CTimerCallbackInstance
{
public:
    explicit CLivePublisherManager(const char* pManagerID);

    virtual ~CLivePublisherManager();

public:// ILivePublisherManager
    virtual bool Initialize(Int32 nThreadCount, const int *pAffinity, int nAffinityLen) override;

    virtual ILivePublisher *CreateLivePublisher(const char *pStreamID, const char *pHost) override;

    virtual void Release() override;

private:
    string                                m_strManagerID;
    vector<shared_ptr<CEventThread>>      m_vecThreadPool;
    uint32_t                              m_threadIndex = 0;
};


#endif //LIVEPUBLISHER_LIVEPUBLISHERMANAGER_H
